package com.yuhuofei2021.spring.boot.weather.service.implement;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import com.yuhuofei2021.spring.boot.weather.entity.Forecast;
import com.yuhuofei2021.spring.boot.weather.entity.Weather;
import com.yuhuofei2021.spring.boot.weather.entity.Yesterday;
import com.yuhuofei2021.spring.boot.weather.service.WeatherReportService;

/**
 * @description 
 * @author yuhuofei2021
 * @date 2021年10月3日
 */
@Service
public class WeatherReportServiceImplement implements WeatherReportService{
	//TODO 改由天气数据API微服务来提供
	
	
	
	@Override
	public Weather getDataByCityId(String cityId) {
		Weather data = new Weather();
		data.setCity("深圳");
		data.setWendu("28");
		data.setGanmao("炎热，注意防中暑");
		
		Yesterday yesterday = new Yesterday();
		yesterday.setDate("2日星期六");
		yesterday.setFl("1级");
		yesterday.setFx("南风");
		yesterday.setHigh("最高温33度");
		yesterday.setLow("最低温26度");
		yesterday.setType("阴");
		
		data.setYesterday(yesterday);
		
		List<Forecast> forecastList = new ArrayList<>();
		
		Forecast forecast = new Forecast();
		forecast.setDate("4日星期一");
		forecast.setFengli("2级");
		forecast.setFengxiang("北风");
		forecast.setHigh("最高温32度");
		forecast.setLow("最低温度27度");
		forecast.setType("晴");
		forecastList.add(forecast);
		
		forecast = new Forecast();
		forecast.setDate("5日星期二");
		forecast.setFengli("2级");
		forecast.setFengxiang("北风");
		forecast.setHigh("最高温32度");
		forecast.setLow("最低温度27度");
		forecast.setType("晴");
		forecastList.add(forecast);
		
		forecast = new Forecast();
		forecast.setDate("6日星期三");
		forecast.setFengli("2级");
		forecast.setFengxiang("北风");
		forecast.setHigh("最高温32度");
		forecast.setLow("最低温度27度");
		forecast.setType("晴");
		forecastList.add(forecast);
		
		forecast = new Forecast();
		forecast.setDate("7日星期四");
		forecast.setFengli("2级");
		forecast.setFengxiang("北风");
		forecast.setHigh("最高温32度");
		forecast.setLow("最低温度27度");
		forecast.setType("晴");
		forecastList.add(forecast);
		
		forecast = new Forecast();
		forecast.setDate("8日星期五");
		forecast.setFengli("2级");
		forecast.setFengxiang("北风");
		forecast.setHigh("最高温32度");
		forecast.setLow("最低温度27度");
		forecast.setType("晴");
		forecastList.add(forecast);
		
		forecast = new Forecast();
		forecast.setDate("9日星期六");
		forecast.setFengli("2级");
		forecast.setFengxiang("北风");
		forecast.setHigh("最高温32度");
		forecast.setLow("最低温度27度");
		forecast.setType("晴");
		forecastList.add(forecast);
		
		data.setForecast(forecastList);
		
		return data;
	}
}
